// 打散目录数据，将三维数组转变为一维数组
export function flatten(array) {
    // return [].concat(...array.map(item => [].concat(item, ...flatten(item.subitems))))
    return [].concat(...array.map(v => [v, ...flatten(v.subitems)]))
}